package com.itheima.kebian;

import java.util.ArrayList;
import java.util.Set;
import java.util.TreeSet;

public class Demo01 {

    public static void main(String[] args) {
        TreeSet<String> set = new TreeSet<>();
        set.add("abc");
        set.add("def");
        set.add("abc");
        set.add("ghi");
        ArrayList<String> list = new ArrayList<>(set);
        System.out.println(list);
        System.out.println(set);
        Set<String> abc = Set.of("abc", "def", "ghi");
        //abc.add("jkl");
        //abc.remove("abc");
       /* for (String s : abc) {
            System.out.println(s);
        }
*/
        TreeSet<String> set2 = new TreeSet<>(Set.of("abc", "def", "ghi"));
        set2.add("jkl");
        System.out.println(set2);


    }
}
